Techniques for modeling elastic rods in position-based dynamics frameworks

ABSTRACT

In one embodiment of the present invention, a position-based dynamics (PBD) framework provides realistic modeling and simulation for elastic rods. In particular, the twisting and bending physics of elastic rods is incorporated into the PBD framework. In operation, an elastic rod model generator represents the center line of an elastic rod as a polyline of points connected via edges. For each edge, the elastic rod model generator adds a ghost point to define the orientation of a material frame that encodes the twist of the edge. Subsequently, a PBD simulator solves for positions of both points and ghost points that, together, represent the evolving position and torsion of the elastic rod. Advantageously, the ghost points enable more realistic animation of deformable objects (e.g., curly hair) than conventional PBD frameworks. Further, unlike force based methods, elastic rod simulation in the PBD framework performs acceptably in environments where speed is critical.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of the co-pending U.S. patentapplication titled, “TECHNIQUES FOR MODELING ELASTIC RODS INPOSITION-BASED DYNAMICS FRAMEWORKS,” filed on Dec. 2, 2014 and havingSer. No. 14/544,157, which claims benefit of the United StatesProvisional Patent Application titled, “POSITION-BASED ELASTIC RODS,”filed on Dec. 3, 2013 and having Ser. No. 61/911,303. The subject matterof these related applications is hereby incorporated herein byreference.

BACKGROUND OF THE INVENTION Field of the Invention

Embodiments of the present invention relate generally to computerscience and, more specifically, to techniques for modelling elastic rodsin position-based dynamics frameworks.

Description of the Related Art

Generating realistic simulation results in real-time is essential foranimating three-dimensional objects in time-sensitive animationapplications, such as game engines. Position-based dynamics (PBD)frameworks are well-suited to many such animation applications. Notably,PBD frameworks employ techniques that sacrifice some quantitativeaccuracy to generate visually plausible results in real-time. Forexample, in PBD frameworks, all deformations of objects arecharacterized with discrete positions of points.

While the tradeoffs exhibited by PBD frameworks are often acceptable,some types of animation are not adequately represented in PBDframeworks. In particular, because PBD frameworks specify positions butnot angles, PBD frameworks are typically unable to simulate complexbending and twisting of objects modeled as rods. Such a restrictionlimits the applicability of PBD frameworks to animation. For example,while PBD frameworks successfully animate much of a human body, PBDframeworks are typically unable to realistically simulate the twistingof curly hair.

Accordingly, elastic rods are commonly simulated using force-basedmethods, such as the finite element method, that are not optimized torepresent deformations as only positions. While such force-based methodsare capable of effectively emulating the natural motion of curly hair,the time required to simulate the thousands of hair strands included ina typical head of hair using force-based methods is prohibitive andunsuitable for animation-oriented applications.

As the foregoing illustrates, what is needed in the art are moreeffective techniques for simulating bending and twisting of elasticrods.

SUMMARY OF THE INVENTION

One embodiment of the present invention sets forth acomputer-implemented method for simulating an elastic rod in a graphicsapplication. The method includes generating a polyline that represents acenter line associated with the elastic rod as a series of edges andpoints; for each edge of the polyline, associating a ghost point withthe edge, where the ghost point has coordinates that define anorientation of a material frame that encodes a torsion associated withthe edge; and computing new positions of the points and the ghost pointsafter a time interval.

One advantage of the disclosed elastic rod modelling techniques is thatthese techniques enable the real-time simulation of bending and twistingbehavior of elements modelled as rods, such as strands of hair. Inparticular, simulations may be performed in a position-based dynamicsenvironment, coupling the efficiency inherent in such environments withthe realistic modeling of torsion.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentinvention can be understood in detail, a more particular description ofthe invention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments. The patent or application file containsat least one drawing executed in color. Copies of this patent or patentapplication publication with color drawing(s) will be provided by theOffice upon request and payment of the necessary fee.

FIG. 1 is a block diagram illustrating a computer system configured toimplement one or more aspects of the present invention;

FIG. 2 is a conceptual diagram of an elastic rod model generated andmaintained within the position-based dynamics (PBD) simulation frameworkof FIG. 1, according to embodiments of the present invention;

FIG. 3 depicts a modified discrete Darboux vector implemented within theposition-based dynamics (PBD) simulation framework of FIG. 1, accordingto one embodiment of the present invention;

FIG. 4 is a conceptual illustration of a bilateral interleaving orderingenforced by the constraint tool of FIG. 1, according to one embodimentof the present invention;

FIG. 5 is a conceptual diagram of a curly haired bunny that is based ona 3D model in which the hair strands are represented using the elasticrod model of FIG. 2, according to one embodiment of the presentinvention; and

FIG. 6 is a flow diagram of method steps for establishing aposition-based dynamics simulation (PBD) framework that supports elasticrod modeling, according to one embodiment of the present invention.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth toprovide a more thorough understanding of the present invention. However,it will be apparent to one of skilled in the art that the presentinvention may be practiced without one or more of these specificdetails.

System Overview

FIG. 1 is a block diagram illustrating a computer system 100 configuredto implement one or more aspects of the present invention. As shown, thecomputer system 100 includes, without limitation, a central processingunit (CPU) 170, a system memory 174, a graphics processing unit (GPU)172, input devices 112, and a display device 114.

The CPU 170 receives input user information from the input devices 112,such as a keyboard or a mouse. In operation, the CPU 170 is the masterprocessor of the computer system 100, controlling and coordinatingoperations of other system components. In particular, the CPU 170 issuescommands that control the operation of the GPU 172. The GPU 172incorporates circuitry optimized for graphics and video processing,including, for example, video output circuitry. The GPU 172 deliverspixels to the display device 114 that may be any conventional cathoderay tube, liquid crystal display, light-emitting diode display, or thelike. In various embodiments, GPU 172 may be integrated with one or moreof other elements of FIG. 1 to form a single system. For example, theGPU 172 may be integrated with the CPU 170 and other connectioncircuitry on a single chip to form a system on chip (SoC).

The system memory 174 stores content, such as software applications anddata, for use by the CPU 170 and the GPU 172. As shown, the systemmemory 174 includes a 3D modelling graphical user interface (GUI) 120, aposition-based dynamics (PBD) simulation framework 110, and an animationengine 130. The 3D modelling GUI 120, the PBD simulation framework 110,and the animation engine 130 are software applications that execute onthe CPU 170, the GPU 172, or any combination of the CPU 170 and the GPU172.

In operation, the 3D modelling GUI 120 enables specification andmodification of a 3D model that describes a 3D object. The 3D modellingGUI 120 may be implemented in any technically feasible fashion andinclude a variety of functionality. For instance, the 3D modelling GUI120 may include an interface that converts designer input such assymbols and brush stroke operations to geometries in the 3D modelcoupled to computer aided design (CAD) software that providesinteractive feedback. Alternatively the 3D model GUI 120 may beconfigured to receive the 3D model via a 3D scanner that analyzes anexisting 3D solid object to create the 3D model as a digital template.

The 3D model may conform to any 3D format as known in the art. Forinstance, in some embodiments the 3D model may capture unit normal andvertices that define the 3D solid object in the stereolithograpy format.In alternate embodiments, the 3D model may capture a 3D mesh ofinterconnected triangles that define the 3D solid object in thecollaborative design activity (COLLADA) format. In alternateembodiments, the 3D model is created manually and the 3D modelling GUI120 is not included in the computer system 100.

The 3D modelling GUI 120 is configured to receive designer inputinformation from the input devices 112. After the 3D modelling GUI 120processes the designer input information in conjunction with the 3Dmodel, the 3D modelling GUI 120 delivers pixels to the display device114. The 3D modelling GUI 20 is configured to continuously repeat thiscycle, enabling the designer to dynamically interact with the 3D modelbased on real-time images on the display device 110.

The 3D modelling GUI 120 is coupled to the PBD simulation framework 110.This coupling may be implemented in any technically feasible fashion,such as exporting the 3D model from the 3D modelling GUI 20 and thenimporting the 3D model to the PBD simulation framework 120.

The PBD simulation framework 110 enables simulation of 3D models.Notably, the PBD simulation framework 110 implements position-basedsimulation techniques to efficiently simulate movement of 3D models fortime-sensitive applications such as movies, computer games, etc. Asshown, the PBD simulation framework 110 includes an elastic rod modelgenerator 112, a constraint tool 114, and a simulation engine 116. Tooptimize performance within the PBD simulation framework 110, the shapeand associated deformations of a 3D model are specified as discreteposition of points. Consequently, conventional PBD simulation frameworksare unable to represent twisting of the 3D model (directly describedwith angular information as opposed to positional information).

For this reason, the PBD simulation framework 110 includes the elasticrod model generator 112. The elastic rod model generator 112 describestwist around the center line of a 3D model indirectly—using positionalinformation to encode the angular information. While the PBD simulationframework 110 includes features that extend and optimize the processingof 3D models to enable realistic bending and twisting of elastic rods,the PBD simulation framework 110 leverages and extends many existing PBDprocesses, such as time-integration, collision, and constraint handling.

In particular, the constraint tool 114 formulates elasticity viaconstraints. The values of these constraints are zero for the rest shapeof the 3D object and increase as strain is applied. At each time step,the simulation engine 116 updates the affected positional information inthe gradient direction of the constraint, representing the internalforce attempting to restore the 3D object to the rest shape. In general,the constraint tool 114 and the simulation engine 116 implementheuristics that mimic the real-world behavior of objects, such as thebending and twisting a rod.

The system memory 174 also includes an animation engine 130 thatleverages the PBD simulation framework 110 to represent real-time motionof 3D objects. In alternate embodiments, the system memory 174 mayinclude any number of applications that exploit features included in thePBD simulation framework 110.

In alternate embodiments, the 3D modelling GUI 120, the PBD simulationframework 110, and/or the animation engine 130 are integrated into anynumber (including one) of software applications. In other embodiments,the system memory 174 may not include the 3D modelling GUI 120 and/orthe animation engine 130. In some embodiments, the 3D modelling GUI 120,the PBD simulation framework 110, and/or the animation engine 130 may beprovided as an application program (or programs) stored on computerreadable media such as a CD-ROM, DVD-ROM, flash memory module, or othertangible storage media.

The components illustrated in the computer system 100 may be included inany type of computer system 100, e.g., desktop computers, servercomputers, laptop computers, tablet computers, and the like.Additionally, software applications illustrated in computer system 100may execute on distributed systems communicating over computer networksincluding local area networks or large, wide area networks, such as theInternet. Notably, the elastic rod model generator 112 described hereinis not limited to any particular computing system and may be adapted totake advantage of new computing systems as they become available.

It will be appreciated that the computer system 100 shown herein isillustrative and that variations and modifications are possible. Thenumber of CPUs 170, the number of GPUs 172, the number of systemmemories 174, and the number of applications included in the systemmemory 174 may be modified as desired. Further, the connection topologybetween the various units in FIG. 1 may be modified as desired.

Modelling Elastic Rods

FIG. 2 is a conceptual diagram of an elastic rod model 200 generated andmaintained within the position-based dynamics (PBD) simulation framework110 of FIG. 1, according to embodiments of the present invention. Inconventional PBD simulation frameworks, the center line of a rod isrepresented by a 3D polyline that can model such behaviors as bendingand stretching, but is unable to represent torsion. To handle torsion,the PBD simulation framework 110 uses material frames 250 that aredefined on the center line on the elastic rod model 200 and track themotion of the center line over time.

For each material frame 250 at a point on the center line, torsion isrepresented as the angle between the current orientation of the materialframe 250 and the orientation of the material frame 250 when the rod isat rest (i.e., an untwisted state of zero energy). Since the PBDsimulation framework 110 does not allow direct specification of angularinformation, the elastic rod model generator 112 is configured torepresent the angular information that defines the orientation of thematerial frames 250 indirectly. More specifically, the elastic rod modelgenerator 112 encodes the orientation of the material frames 250 viapositional information of ghost points 230. Conceptually, the ghostpoints 230 represent material distributed around the center line.

In operation, the elastic rod model generator 112 initially creates a 3Dpolyline that represents the center line of the elastic rod. As shown,the 3D polyline of the elastic rod model 200 includes (N+1) points and Nedges 220. The points 210 represent the end points of the interconnectedline segments, and the edges 220 represent the line segments.

After establishing the 3D polyline, the elastic rod model generator 112adds N ghost points 230 to the 3D polyline. Notably, for each of the Nedges 220, the elastic rod model generator 112 adds the ghost point 230that defines the material frame 250 for the line segment correspondingto the edge 220. In general, the elastic rod model generator 112 placeseach of the ghost points 230 on a perpendicular bisector of thecorresponding edge 220. The angle of the perpendicular bisector encodesthe twist about the center line relative to the rest state, and thedistance along the perpendicular bisector reflects the rotationalinertia around the corresponding edge 220.

As shown for material frame 250 _(e), each material frame 250 is definedbased on an orthonormal material bases d¹, d², d³. The material frame250 is a three-by-three orthonormal matrix D=|d¹, d², d³| that includesthe orthonormal material bases as columns. The material frame axes 255_(e) depicts the calculation of the material frame 250 based on theassociated ghost point 230 _(e) and the points 210 _(e-1) and _(210e).Using interpolation techniques in conjunction with the discrete points210 and ghost points 230, components within the PBD framework 110efficiently access both the orientation of the material frames 250 andthe resistance of the elastic rod to twisting in a continuous fashionacross the length of the elastic rod.

FIG. 3 depicts a modified discrete Darboux vector 350 implemented withinthe position-based dynamics (PBD) simulation framework 110 of FIG. 1,according to one embodiment of the present invention.

In general, the simulation engine 116 models bending and twisting of theelastic rod model 200 using a discretization of Cosserat theory.Cosserat theory describes the bending and twisting energy of a rod fromthe rate-of-change of the material frame 250. Accordingly, a keycomponent of Cosserat theory is the Darboux vector 310—an axial vectorof frame rotation with respect to position along the rod that is definedusing the bases of the material frames 250.

In Cosserat theory, the strain energy 330 is the Darboux vectordifference between the deformed shape and the rest shape of a rod. Toincrease both the speed and robustness of the energy calculations,instead of implementing Cosserat formulas based on the conventionalDarboux vector 350, the simulation engine 116 substitutes a modifieddiscrete Darboux vector 350. As shown, the modified discrete Darbouxvector 350 is a relative simple formula that does not use trigonometry.Advantageously, the modified discrete Darboux vector 350 enables thesimulation engine 116 to apply the discretization of Cosserat theorywithout computing relatively expensive trigonometric functions.

In various embodiments, the PBD framework 110 may implement any typeequations to simulate motion based on the elastic rod model 200.Further, components within the PBD framework 110 may simplify and/ordiscretize formulas to optimize performance in any technically feasiblemanner.

FIG. 4 is a conceptual illustration of a bidirectional interleavingordering 410 enforced by the constraint tool 114 of FIG. 1, according toone embodiment of the present invention. As part of representing andsimulating the elastic rod model 200, the PBD simulation framework 110handles elasticity in the form of constraints, such as coupling betweena point 210, a material frame 250, a triangle, and/or a rigid body.

In general, the simulation engine 116 iteratively updates the locationsof the points 210 and the ghost points 230 such that linearizedconstraints are locally satisfied. In the PBD simulation framework 110,the simulation engine 116 enforces each constraint in the form of aninternal force. Enforcing the twist constraint of the elastic rod model220 in the conventional sequential order is similar to an elastic wavepropagating inside the elastic rod. The elastic rod has many harmonicvibration modes where the elastic wave goes back and force in thestrand, and the sequential constraint enforcement may excite suchvibrations.

For this reason, the constraint tool 114 configures the simulationengine 116 to apply the constraints based on the bidirectionalinterleaving order 410. As shown, the constraint tool 114 interleavesthe constraints for both directions of the elastic rod model 200.Advantageously, applying constraints simultaneously from two directionscancels the vibration modes, producing stable results without excessiveenergy gain.

FIG. 5 is a conceptual diagram of a curly haired bunny 510 that is basedon a 3D model in which the hair strands are represented using theelastic rod model 200 of FIG. 2, according to one embodiment of thepresent invention.

Because the PBD simulation framework 100 is both efficient and robust,the PBD framework 110 may be used to provide advanced functionality in avariety of interactive tools. In some embodiments, the 3D modelling GUI120 includes functionality that enables the user to create hair volumes.In particular, the 3D modelling GUI 120 provides mechanisms tointeractive manipulate parameters of the hair, such as twisting andscaling individual strands. This hair design functionality may also beextended to create solid hair for 3D printing purposes. For explanatorypurposes, FIG. 5 illustrates the model of the curly haired bunny 510designed and simulated in the PBD simulation framework 100, and theresulting 3D-printed bunny object.

Since there are thousands of hairs on a typical scalp, without theefficiency exhibited by the PBD simulation framework 100, suchconstructive interactive design would be prohibitively slow. Forexample, the complex calculations employed by finite element methodsrequire unreasonable amounts of time for time-sensitive applications.Further, because of the high number of PBD-based calculations necessaryto realistically simulate 3D objects, manual approaches are unable toproduce useful real-time results.

FIG. 6 is a flow diagram of method steps for establishing aposition-based dynamics simulation (PBD) framework that supports elasticrods modelling, according to one embodiment of the present invention.Although the method steps are described with reference to the systems ofFIGS. 1-5, persons skilled in the art will understand that any systemconfigured to implement the method steps, in any order, falls within thescope of the present invention.

As shown, a method 600 begins at step 604, where the elastic rod modelgenerator 112 initializes the elastic rod model 200 for a rod. Morespecifically, the elastic rod model generator 112 creates a polylinethat resents the center line of the rod and includes (N+1) points 210and (N) edges 220. At step 606, the elastic rod model generator 112 setsa current segment to the portion of the center line segment that isrepresented by the first edge 220.

At step 610, the elastic rod model generator 112 determines a “rest”perpendicular bisector as the perpendicular bisector of the current linesegment when the current segment is at rest (state of zero energy). Theelastic rod model generator 112 may determine the rest perpendicularbisector in any technically feasible fashion that is consistent acrossthe points 210 and the ghost points 230.

At step 612, the elastic rod model generator 112 computes a “current”perpendicular bisector of the current segment, encoding the twist of thecurrent segment as the angle between the current perpendicular bisectorand the rest perpendicular bisector. Notably, the elastic rod modelgenerator 112 sets the current perpendicular bisector such that thecross product between the current edge 220 and the current perpendicularbisector represents the rotation of the current edge 220. In alternateembodiments, the elastic rod model generator 112 may encode the twist inany technically feasible and deterministic fashion.

At step 614, the elastic rod model generator 112 computes a strengthdistance based on the bending resistance of the current segment. Theelastic rod model generator 112 may encode the bending resistance in anytechnically feasible and consistent manner. At step 616, the elastic rodmodel generator 112 determines the coordinates for the ghost point200—setting the position to be the strength distance along the currentperpendicular bisector. Notably, the current perpendicular bisector isone of the axes of the material frame 250. The elastic rod modelgenerator 112 computes the remaining two axes as illustrated in thematerial frame axes 255 of FIG. 2. Advantageously, using the ghost point200 to encode the strength and material frame for the current segmentenables realistic modelling of torsion in the PBD simulation framework110.

At step 618, if the elastic rod model generator 112 determines that thecurrent edge 220 is not the last edge 220 included in the polyline, thenthe method 600 proceeds to step 620. At step 620, the elastic rod modelgenerator 112 sets the current segment to the center line segment thatis represented by the next edge 220, and the method 600 returns to step610. The elastic rod model generator 112 continues to execute steps610-618, encoding the material frame 250 for each edge 220 via thecorresponding ghost point 230 until the elastic rod model 200 includesghost points 230 for each of the edges 220.

If, at step 618, the elastic rod model generator 112 determines that theedge 220 is the last edge 220 included in the polyline, then the method600 proceeds directly to step 622. At step 622 the elastic rod model 200is complete and various components included in the PBD simulationframework 110 operate on the elastic rod model 200. Advantageously, thePBD simulation framework 110 analyzes the material frames 250 inconjunction with optimized simulation techniques such as applying themodified discrete Darboux vector 350 and enforcing bidirectionalinterleaving ordering 410 to increase the speed and robustness of thesimulation.

In sum, the disclosed techniques may be used to efficiently model andsimulate complex bending and twisting of elastic rods in position-baseddynamics (PBD) frameworks. In operation, an elastic rod model generatorpartitions an elastic rod into segments that are represented by edgesand connected at points. This polyline represents the physical locationof the elastic rod and characterizes any bending and stretching, but nottorsion. To represent torsion, the elastic rod model generator enhancesthe polyline—adding a “ghost’ point per edge. Notably, the elastic rodmodel generator selects the location of each ghost point to define theorientation of a material frame that follows the tangential direction ofthe elastic rod. By encoding the orientation of the material frames inthe coordinates of the ghost points, the twist about each edge isindirectly, but accurately, represented.

Advantageously, the position-based elastic modelling techniquesdisclosed herein enable realistic, real-time animation of objects thatbend and twist. In particular, the insertion of ghost points enablesplausible real-time simulation and rendering of curly hair. By contrast,conventional PBD frameworks are unable to represent the torsion inelastic rods, and therefore are unable to simulate phenomena such asnaturally-behaving curly hair. Further, since the position-based elasticmodel leverages the efficiency of position-based dynamic, the elasticrod model and associated techniques may be successfully employed bytime-critical applications, such as game engines.

The descriptions of the various embodiments have been presented forpurposes of illustration, but are not intended to be exhaustive orlimited to the embodiments disclosed. Many modifications and variationswill be apparent to those of ordinary skill in the art without departingfrom the scope and spirit of the described embodiments.

Aspects of the present embodiments may be embodied as a system, methodor computer program product. Accordingly, aspects of the presentdisclosure may take the form of an entirely hardware embodiment, anentirely software embodiment (including firmware, resident software,micro-code, etc.) or an embodiment combining software and hardwareaspects that may all generally be referred to herein as a “circuit,”“module” or “system.” Furthermore, aspects of the present disclosure maytake the form of a computer program product embodied in one or morecomputer readable medium(s) having computer readable program codeembodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

Aspects of the present disclosure are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of thedisclosure. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, enable the implementation of the functions/acts specified inthe flowchart and/or block diagram block or blocks. Such processors maybe, without limitation, general purpose processors, special-purposeprocessors, application-specific processors, or field-programmable

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

While the preceding is directed to embodiments of the presentdisclosure, other and further embodiments of the disclosure may bedevised without departing from the basic scope thereof, and the scopethereof is determined by the claims that follow.

What is claimed is:
 1. A computer-implemented method for simulating anelastic rod in a graphics application, the method comprising: generatinga polyline that represents a center line associated with the elastic rodas a series of edges and points; for each edge of the polyline,associating a ghost point with the edge, wherein the ghost point hascoordinates that define an orientation of a material frame that encodesa torsion associated with the edge; and computing new positions of thepoints and the ghost points after a time interval.
 2. Thecomputer-implemented method of claim 1, wherein, for a first edge of thepolyline, associating the ghost point comprises: defining a firstperpendicular bisector of the first edge, wherein the firstperpendicular bisector represents the first edge in a rest state;computing a second perpendicular bisector of the first edge at an angleto the first perpendicular bisector, wherein the angle corresponds tothe torsion of the first edge; and setting the coordinates of the ghostpoint to specify the angle.
 3. The computer-implemented method of claim2, wherein, for the first edge of the polyline, associating the ghostpoint further comprises setting a distance of the ghost point from thefirst edge based on a strength of a bending resistance associated with aportion of the elastic rod corresponding to the first edge.
 4. Thecomputer-implemented method of claim 2, wherein computing the secondperpendicular bisector comprises computing a cross-product to determinea bisector.
 5. The computer-implemented method of claim 1, whereincomputing the new positions comprises: determining a first materialframe based on a first ghost point and a second material frame based ona second ghost point, wherein both the first material frame and thesecond material frame track the motion of the center line over time; anddetermining a bending and twisting energy from a rate-of-change of theposition of the center line between the first material frame and thesecond material frame.
 6. The computer-implemented method of claim 5,wherein determining the bending and twisting energy comprises:calculating a Darboux vector by performing an interpolation between thefirst material frame and the second material frame; and applying theDarboux vector to determine the bending and twisting energy withoutcomputing any trigonometric functions.
 7. The computer-implementedmethod of claim 1, wherein computing the new positions comprisesapplying one or more constraints in a bi-directional interleaving order.8. The computer-implemented method of claim 7, wherein the one or moreconstraints include a coupling between a first point and one of a frame,a triangle, and a rigid body.
 9. The computer-implemented method ofclaim 8, further comprising generating a three-dimensional model forthree-dimensional printing based on the new positions of the points ofthe polyline.
 10. One or more non-transitory computer-readable storagemedia including instructions that, when executed by one or moreprocessors, cause the one or more processors to perform the steps of:generating a polyline that represents an elastic rod as a series ofedges and points; for each edge of the polyline, associating a ghostpoint with the edge, wherein the ghost point has coordinates that definean orientation of a material frame that encodes a torsion associatedwith the edge; and computing new positions of the ghost points and atleast one point of the polyline after a time interval.
 11. The one ormore non-transitory computer-readable storage media of claim 10,wherein, for a first edge of the polyline, associating the ghost pointcomprises: defining a first perpendicular bisector of the first edge,wherein the first perpendicular bisector represents the first edge in arest state; computing a second perpendicular bisector of the first edgeat an angle to the first perpendicular bisector, wherein the anglecorresponds to the torsion of the first edge; and setting thecoordinates of the ghost point to specify the angle.
 12. The one or morenon-transitory computer-readable storage media of claim 11, wherein, forthe first edge of the polyline, associating the ghost point furthercomprises setting a distance of the ghost point from the first edgebased on a strength of a bending resistance associated with a portion ofthe elastic rod corresponding to the first edge.
 13. The one or morenon-transitory computer-readable storage media of claim 11, whereincomputing the second perpendicular bisector comprises computing across-product to determine a bisector.
 14. The one or morenon-transitory computer-readable storage media of claim 10, wherein thepolyline represents a center line of the elastic rod, wherein computingthe new positions comprises: determining a first material frame based ona first ghost point and a second material frame based on a second ghostpoint, wherein both the first material frame and the second materialframe track the motion of the center line over time; and determining abending and twisting energy from a rate-of-change of the position of thecenter line between the first material frame and the second materialframe.
 15. The one or more non-transitory computer-readable storagemedia of claim 14, wherein determining the bending and twisting energycomprises: calculating a Darboux vector by performing an interpolationbetween the first material frame and the second material frame; andapplying the Darboux vector to determine the bending and twisting energywithout computing any trigonometric functions.
 16. The one or morenon-transitory computer-readable storage media of claim 10, whereincomputing the new positions comprises applying one or more constraintsin a bi-directional interleaving order.
 17. The one or morenon-transitory computer-readable storage media of claim 16, wherein theone or more constraints include a coupling between a first point and oneof a frame, a triangle, and a rigid body.
 18. The one or morenon-transitory computer-readable storage media of claim 17, furthercomprising generating a three-dimensional model for three-dimensionalprinting based on the new position of the at least one point of thepolyline.
 19. A system, comprising: one or more memories storinginstructions; one or more processors that are coupled to the one or morememories and, when executing the instructions, are configured to:generate a polyline that represents an elastic rod as a series of edges;for each edge of the polyline, associate a ghost point with the edge,wherein the ghost point has coordinates that define an orientation of amaterial frame; and compute new positions of the ghost points after atime interval; and a display device coupled to the one or moreprocessors and configured to display the elastic rod.
 20. The system ofclaim 19, wherein: the polyline represents a center line of the elasticrod; and the ghost point has coordinates that define the orientation ofthe material frame that encodes a torsion associated with the edge.